package com.platform.controller.web;


import com.platform.common.annotation.Log;
import com.platform.common.constant.Constants;
import com.platform.common.core.domain.AjaxResult;
import com.platform.common.core.page.TableDataInfo;
import com.platform.common.enums.BusinessType;
import com.platform.system.domain.dto.device.ModelAppInfoDto;
import com.platform.system.domain.vo.device.ModelAppInfoVo;
import com.platform.system.domain.vo.device.SpeakerInfoVo;
import com.platform.system.service.ISysChatBackgroundMusicService;
import com.platform.system.service.ISysModelAppInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Huangkai
 */
@Slf4j
@RestController
@RequestMapping("/modelAppInfo/web")
public class WebModelAppInfoController {

    @Resource
    ISysModelAppInfoService sysModelAppInfoService;

    /**
     * 客户端根据类型查询大模型
     */
    @Log(title = "客户端根据类型查询大模型", businessType = BusinessType.OTHER)
    @PostMapping("/selectModelAppInfoListByType")
    public AjaxResult selectModelAppInfoListByType(@RequestBody @Validated ModelAppInfoVo modelAppInfoVo) {
        modelAppInfoVo.setStatus(Constants.NUM_ONE);
        List<ModelAppInfoDto> modelAppInfoDtoList =  sysModelAppInfoService.selectModelAppInfoListByType(modelAppInfoVo);
        return AjaxResult.success(modelAppInfoDtoList);
    }

}
